Wireless devices based on the Android™ platform come in many shapes and sizes and are sold around the world. With such a wide range of devices, Android™ application developers are confronted with innumerable device configurations, including different languages, different screen sizes and resolutions, different mobile carriers/operators, and multiple versions of the Android™ platform. In order to deal with this issue effectively, Android™ creates a sophisticated mechanism for supporting various devices with a single package file format. The Android™ application package (APK) is the package file format used by the Android™ operating system to distribute and to install application software and middleware.
An Android™ program is complied and all of the program components are packaged into one APK file. The APK file may have any name that ends with the extension “.apk”. The APK file contains all of the program code (such as .dex files), resources, assets, certificates, and a manifest file. APK files are a type of archive file, typically in zip format packages based on the JAR file format. An APK file may be downloaded and installed on Android™ devices in the same manner as installing software on a desktop or laptop computer.
For example, if an application developer decides to support a new language, a new language string.xml may be created in a different resource directory with language code, as in the following example:
MyProject/ res/  values/   strings.xml  values-es/   strings.xml  values-fr/   strings.xml
This is a useful solution for supporting various devices with one APK. However, the drawback is that using a single APK to support all possible implementations of different screen sizes, resolutions, languages, networks, and the like, consumes more storage space in order to keep all of the extra resources. A further demonstration of wasted image resource space is provided in the following example:
MyProject/ res/  drawable-xhdpi/   awesomeimage.png  drawable-hdpi/   awesomeimage.png  drawable-mdpi/   awesomeimage.png  drawable-ldpi/   awesomeimage.png
The project in the above example uses multiple directories to support devices having various resolutions. But only one resource will actually be used when the application runs, because the target device has only one unique resolution. The rest of the resources will not be used unless a target device is changed.
Therefore, there is a need for improved systems and methods for saving storage space on an Android™ device. In particular, there is a need for systems and methods for eliminating or reducing unnecessary device storage space used by the APK file on an Android™ device.